<template>
	<el-form ref="form" :model="form" label-width="80px">
	  <el-form-item label="ID">
	    <el-input v-model="form.id"></el-input>
	  </el-form-item>
	  <el-form-item label="名称">
	    <el-input v-model="form.name"></el-input>
	  </el-form-item>
	  <el-form-item label="UID">
	    <el-input v-model="form.uid"></el-input>
	  </el-form-item>
	  
	  <el-form-item>
	    <el-button type="primary" @click="update">修改</el-button>
	    <el-button>取消</el-button>
	  </el-form-item>
	</el-form>
</template>

<script>
	
	import axios from "axios"
	
	//http://localhost:9090/v1/admin/order/findById
	 export default {
	    data() {
	      return {
	        form: {
	          name: '',
			  id:this.$route.query.id,
			  uid:''
	          
	        }
	      }
	    },
		
		created() {
			console.log(this.$route.query.id)
			console.log(this.form.id)
			axios.get('http://localhost:8100/api-order/v1/admin/order/findById?id='+this.form.id).then(res=>{
				this.form.name = res.data.data.name;
				this.form.uid = res.data.data.uid;
			})
		},
		
	    methods: {
	      update() {
	        console.log('submit!');
	      }
	    }
	  }
</script>

<style>
</style>